package ar.uade.edu.fain.ad.server.dao.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@Table(name = "AREA")
public class AreaEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	private Long id;

	@OneToMany(mappedBy = "area")
	private List<EmpleadoEntity> empleados;

	@ManyToOne
	@JoinColumn(name = "idLocal")
	private LocalEntity local;

	public AreaEntity() {
		super();
	}

	public List<EmpleadoEntity> getEmpleados() {
		return empleados;
	}

	public void setEmpleados(List<EmpleadoEntity> empleados) {
		this.empleados = empleados;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setLocal(LocalEntity local) {
		this.local = local;
	}

	public LocalEntity getLocal() {
		return local;
	}
}
